home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
M-More Monthly Disks
/
(c)m6.d64
/
lander.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
92 lines
10 FORT=0TO62:READA:POKE832+T,A:NEXT
20 DATA0,126,0,1,129,128,2,0,64
30 DATA4,0,32,28,6,56,4,137,32
40 DATA4,137,32,4,230,32,4,128,32
50 DATA4,0,32,3,255,192,3,24,192
60 DATA3,36,192,6,66,96,6,126,96
70 DATA12,0,48,12,0,48,24,0,24
80 DATA24,0,24,24,0,24,126,0,126
90 POKEV+33,0:POKEV+41,1
100 FORT=960TO1017:READA:POKET,A:NEXT
110 DATA169,254,120,141,0,220,173,1,220,10,162,3,10,144,3,202,208,250
120 DATA134,251,169,223,141,0,220,174,1,220,169,1,133,252,138,41,16,208
130 DATA2,198,252,138,41,128,208,2,230,252,169,255,141,1,220,169,127
140 DATA141,0,220,88,96
150 FORI=896TO926STEP3:POKEI,255:POKEI+1,0:POKEI+2,255:NEXT
160 POKE53281,0:PRINT"[147][155]"SPC(17)"LANDER[146]"
170 PRINT" YOU PILOT A LANDING CRAFT FROM ITS"
180 PRINT"LAUNCH PLATFORM TO THE BASE IN THE"
190 PRINT"MOUNTAINS. YOU MUST LAND ON THE RED"
200 PRINT"STRIP VERY GENTLY AND CAREFULLY."
210 PRINT""SPC(13)"YOUR CONTROLS[146]"
220 PRINT"THRUST CONTROL"
230 PRINT"F5- 1.5 GRAVITIES"
240 PRINT"F3- 1.0 GRAVITIES"
250 PRINT"F1- 0.5 GRAVITIES"
260 PRINT"LATERAL JET CONTROL"
270 PRINT"< - LEFT JET"
280 PRINT"> - RIGHT JET"
290 PRINT"LARGE,MEDIUM OR SMALL":PRINT"FUEL TANK (L,M,S)?"
300 GETA$:IFA$=""GOTO300
310 IFA$="L"THENFU=9900:GOTO350
320 IFA$="M"THENFU=4000:GOTO350
330 IFA$="S"THENFU=2000:GOTO350
340 GOTO300
350 V=53248:C=54272:PRINT"[147][152]";:FORT=1984TO2023:POKEC+T,1:POKET,160:NEXT
360 PRINTSPC(39)"[169]";
370 PRINTSPC(38)"[169] ";
380 PRINTSPC(37)"[169] ";
390 PRINTSPC(37)" ";
400 PRINTSPC(35)"[169][223] ";
410 PRINTSPC(34)"[169] ";
420 PRINTSPC(34)" ";
430 PRINTSPC(34)" ";
440 PRINTSPC(33)"[169] ";
450 PRINTSPC(33)" ";
460 PRINTSPC(33)" ";
470 PRINTSPC(32)"[169] ";
480 PRINTSPC(31)"[169] ";
490 PRINTSPC(15)"[169][223]"SPC(14)" ";
500 PRINTSPC(11)"[169] [223][169] [223]"SPC(12)"[169] ";
510 PRINTSPC(11)" "SPC(10)"[169] ";
520 PRINTSPC(11)" [223]"SPC(9)" ";
530 PRINTSPC(11)" "SPC(9)" ";
540 PRINTSPC(10)" [223][146]"SPC(8)"[223] [146][169]"SPC(8)" ";
550 PRINTSPC(9)"[152][169] [223]"SPC(17)" ";
560 PRINTSPC(8)"[152][169] "SPC(17)" ";
570 PRINTSPC(7)"[152][169] [223]"SPC(15)" ";
580 PRINTSPC(6)"[152][169] [146]"SPC(7)"[129][175][175][175][175][175][175] [146]";
590 PRINT"[152][172][169][223][146][162][172][169] [223][146][187][162][175][187][169] [223][146] [146][145][145]"
600 POKEV+21,0:POKE2042,13:POKE2040,14
610 POKEV+23,0:POKEV+29,0:POKEV+27,1
620 POKEV+41,1:POKEV+39,6
630 HP=28:VP=213:VV=0:VH=0:T0=1
640 GETA$:IFA$<>""GOTO640
650 POKEV,28:POKEV+1,234:POKEV+5,VP:POKEV+4,HP:POKEV+16,0:POKEV+21,5
660 GETA$:IFA$<>"[135]"GOTO660
670 POKEV+21,4
680 Q=PEEK(V+31):IFQ<>0THEN680
690 IFVP>256THEN750
700 POKEV+5,VP
710 POKEV+4,HPAND255:POKEV+16,SGN(HPAND256)*4
720 Q=PEEK(V+31):IFQ=0THEN790
730 IFABS(VV)>=2OR(HP<270)OR(HP>295)ORABS(VH)>2ORVP<210GOTO750
740 PRINT""SPC(10)"YOU HAVE LANDED!!!":FORT=1TO500:NEXT:GOTO880
750 POKE2042,0:PRINT""SPC(15)"CRASH!!![146]"
760 POKEV+41,10
770 FORI=1TO5:POKEV+33,7:FORJ=1TO140:NEXT:POKEV+33,0:FORJ=1TO140:NEXT:NEXT
780 FORT=1TO500:NEXT:POKEV+21,0:GOTO880
790 SYS960:TV=PEEK(251)/2:AH=PEEK(252)-1:AV=1-TV:FU=FU-(TV+ABS(AH))*20
800 IFFU<0THENAV=1:AH=0:FU=0
810 PRINTSPC(10)"FUEL"RIGHT$(" "+STR$(INT(FU)),5)"[145]"
820 VP=VP+VV*T0+.5*AV*T0*T0:VV=VV+AV*T0
830 HP=HP+VH*T0+.5*AH*T0*T0:VH=VH+AH*T0
840 IFHP<0THENHP=345
850 IFHP>345THENHP=0
860 IFVP<0THENPRINT"[147]OUT OF SKY":FORT=1TO500:NEXT:GOTO160
870 GOTO690
880 PRINT"ANOTHER GAME?"
890 GETA$:IFA$="Y"THENPOKEV+21,0:GOTO160
900 IFA$<>"N"THEN890
910 POKEV+21,0:POKEV+33,6:PRINT"[147][154]"